<!--头-->
<style scoped>
  .headWrap {
    z-index: 1;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 4rem;

  }

  .head {
    width: 100%;
    height: 2.2rem;
    line-height: 2.2rem;
    background: url("../assets/images/components/navBg.png") no-repeat;
    background-size: cover;
    color: #fff;
    font-size: .9rem; /*px*/
  }

  .backImg {
    float: left;
    width: .6rem;
    height: 2.2rem;
    line-height: 2.2rem;
    text-align: left;
    background: url('../assets/images/back.png') no-repeat center;
    background-size: .6rem 1.1rem;
    padding: 0 .75rem 0 .75rem;
  }

  .centerInfo {
    text-align: center;
    width: 14.55rem;
    float: left;
  }

  .week {
    display: -webkit-flex;
    display: flex;
    width: 100%;
    padding: .5rem 0;
    background-color: #fff;
    font-size: .8rem; /*px*/
    line-height: .8rem;
    height: .8rem;
  }

  .week div {
    -webkit-flex: 1;
    flex: 1;
    text-align: center;
  }

  .weekend {
    color: #0094db;
  }

  .dateBox {
    padding-top: 4rem;
    height: 1.5rem;
    line-height: 1.5rem;
    font-size: .8rem; /*px*/
  }


</style>

<!--日期-->
<style scoped>
  .monthTitle {
    background-color: #eee;
    text-align: center;
  }

  .month {
    margin-bottom: .5rem;
  }

  .days {
    width: 100%;
  }

  .day {
    width: 1.675rem;
    height: 1.675rem;
    line-height:1.675rem;
    margin: .5rem;
    float: left;
    text-align: center;
  }

  .dayActive {
    background-color: #0094db;
    color: #fff;
    border-radius: 50%;
    position: relative;
  }

  .dayruzhu {
    background-color: #fff;
    color: #ccc;
  }

  .dayKong {
    background-color: #fff;
  }

  .no {
    color: #ccc!important;
  }

  .dayActive .tipDiv {

  }
</style>

<template>
  <div class="myDatePicker">
    <div class="headWrap">
      <div class="head fix">
        <a href="javascript:;" class="backImg" @click="dateBack"></a>
        <div class="centerInfo" v-text="centerInfo" @click="centerClick"></div>
        <div class="rightInfo" v-text="rightInfo" @click="rightClick"></div>
      </div>
      <div class="week fix">
        <div class="weekend">日</div>
        <div>一</div>
        <div>二</div>
        <div>三</div>
        <div>四</div>
        <div>五</div>
        <div class="weekend">六</div>
      </div>
    </div>
    <div class="dateBox">
      <div class="year" v-for="(item,index) in years" @click="yearClick($event,index)">
        <div class="month" v-for="(item,index) in years[index].dateYear" @click="monthClick($event,index)">
          <div class="monthTitle">{{item.year}}年{{item.month}}月</div>
          <div class="fix days">
            <div class="day" v-for="(itemDay,index) in item.days" @click="dayClick($event,index)"
                 @touchend="dayClickEnd" :class="{no:itemDay.no}">{{itemDay.day}}
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>


<script>
  import headNav from './headNav.vue'

  var currentTime = new Date();
  var currentYear = currentTime.getFullYear();
  var currentMonth = currentTime.getMonth() + 1;
  var currentDate = currentTime.getDate();
  var currentDay = currentTime.getDay();
  var currentMinWeek;

  if (currentMonth < 10) {
    currentMonth = '0' + currentMonth
  }

  if (currentDate < 10) {
    currentDate = '0' + currentDate
  }


  export default{
    data(){
      return {
        jintian: '',
        yearIndex: 0,
        monthIndex: 0,
        dayIndex: 0,
        centerInfo: '选择入住离店日期',
        years: [],
        min: '2017-01-05',
        max: '2018-04-09',
        selDay: '',
        selMonth: '',
        selYear: '',
        tipDivText: '入住',
      }
    },
    methods: {
      num9(num){
        num = parseInt(num);
        if (num < 10) {
          num = '0' + num;
          return num;
        } else {
          return num;
        }
      },
      yearClick(e, index){
        if (e.target.className == 'day no') {
          return;
        }

        this.yearIndex = index;

        var day = this.years[this.yearIndex].dateYear[this.monthIndex].days[this.dayIndex].day;
        var month = this.years[this.yearIndex].dateYear[this.monthIndex].month;
        var year = this.years[this.yearIndex].dateYear[this.monthIndex].year;

        if (day == '今天') {
          day = this.jintian;
        }
        var selTime = year + '-' + month + '-' + day;


        if (e.target.className == 'day' || e.target.className == 'day dayActive') {
          if (this.$route.params.ruzhu == 1) {
            this.$store.state.hotel.ruzhuTime = selTime;
            this.$store.state.hotel.ruzhuYear = year;
            this.$store.state.hotel.ruzhuMonth = month;
            this.$store.state.hotel.ruzhuDay = day;

            if (this.lidianSelected == 1) {//选择过离店日期
              var zhutime = new Date(this.lidianTime.split('-').join('/')) - new Date(this.ruzhuTime.split('-').join('/'));
              this.$store.state.hotel.zhuTian = zhutime / 86400000;
              if (this.zhuTian < 1) {
                var d1 = new Date(this.ruzhuTime);
                this.$store.state.hotel.curMonthDays = new Date(d1.getFullYear(), (d1.getMonth() + 1), 0).getDate();
                if (this.curMonthDays > parseInt(this.ruzhuDay)) {
                  this.$store.state.hotel.lidianYear = this.ruzhuYear;
                  this.$store.state.hotel.lidianMonth = this.ruzhuMonth;
                  this.$store.state.hotel.lidianDay = this.num9(parseInt(this.ruzhuDay) + 1);
                } else {
                  if (parseInt(this.ruzhuMonth) == 12) {
                    this.$store.state.hotel.lidianYear = year + 1;
                    this.$store.state.hotel.lidianMonth = '01';
                    this.$store.state.hotel.lidianDay = '01';
                  } else {
                    this.$store.state.hotel.lidianYear = this.ruzhuYear;
                    this.$store.state.hotel.lidianMonth = this.num9(parseInt(this.ruzhuMonth) + 1);
                    this.$store.state.hotel.lidianDay = '01';
                  }
                }

              }
            } else {//没有选择过离店日期
              var d = new Date(this.ruzhuTime);
              this.$store.state.hotel.curMonthDays = new Date(d.getFullYear(), (d.getMonth() + 1), 0).getDate();
              if (this.curMonthDays > parseInt(this.ruzhuDay)) {
                this.$store.state.hotel.lidianYear = this.ruzhuYear;
                this.$store.state.hotel.lidianMonth = this.ruzhuMonth;
                this.$store.state.hotel.lidianDay = this.num9(parseInt(this.ruzhuDay) + 1);
              } else {
                if (parseInt(this.ruzhuMonth) == 12) {
                  this.$store.state.hotel.lidianYear = year + 1;
                  this.$store.state.hotel.lidianMonth = '01';
                  this.$store.state.hotel.lidianDay = '01';
                } else {
                  this.$store.state.hotel.lidianYear = this.ruzhuYear;
                  this.$store.state.hotel.lidianMonth = this.num9(parseInt(this.ruzhuMonth) + 1);
                  this.$store.state.hotel.lidianDay = '01';
                }
              }
            }


            this.$router.push({
              name: this.$route.params.back,
              params: {
                dateSel: 1 //表示选择了时间
              }
            })

          } else if (this.$route.params.ruzhu == 2) {
            this.$store.state.hotel.lidianTime = selTime;
            this.$store.state.hotel.lidianYear = year;
            this.$store.state.hotel.lidianMonth = month;
            this.$store.state.hotel.lidianDay = day;
            this.$store.state.hotel.lidianSelected = 1;
            this.$router.push({
              name: this.$route.params.back,
              params: {
                dateSel: 1,
              }
            })
          }

          this.$store.state.hotel.ruzhuTime = this.ruzhuYear + '-' + this.ruzhuMonth + '-' + this.ruzhuDay;
          this.$store.state.hotel.lidianTime = this.lidianYear + '-' + this.lidianMonth + '-' + this.lidianDay;

          var zhutime = new Date(this.lidianTime.split('-').join('/')) - new Date(this.ruzhuTime.split('-').join('/'));
          this.$store.state.hotel.zhuTian = zhutime / 86400000;


          if (this.ruzhuTime == this.$store.state.currentDate) {
            this.$store.state.hotel.todayWeek = '今天'
          } else {
            var kk = new Date(this.ruzhuTime.split('-').join('/')).getDay();
            var x = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");

            this.$store.state.hotel.todayWeek = x[kk];
          }

          if (this.lidianTime == this.$store.state.tomorrow) {
            this.$store.state.hotel.tomorrowWeek = '明天'
          } else {
            var kk = new Date(this.lidianTime.split('-').join('/')).getDay();
            var x = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");

            this.$store.state.hotel.tomorrowWeek = x[kk];
          }

        }
      },
      monthClick(e, index){
        this.monthIndex = index;
      },
      dayClick(e, index){

        var my = document.querySelector('.tipDiv');

        if (my != null) my.parentNode.removeChild(my);


        if (e.target.className == 'day no') {

        } else {
          var jj = document.querySelectorAll('.day');
          for (var i = 0; i < jj.length; i++) {
            if (jj[i].className == 'day no') {

            } else {
              jj[i].className = 'day'
            }
          }

          e.target.className = 'day dayActive';
          this.dayIndex = index;

          if (e.target.innerText == '') {
            e.target.className = 'day dayKong'
          }

          var tipDiv = document.createElement("div");
          tipDiv.innerText = this.tipDivText;

          e.target.appendChild(tipDiv);

          tipDiv.className = 'tipDiv';
          tipDiv.style.backgroundColor = '#0094db';
          tipDiv.style.lineHeight = '44px';
        }


      },
      dayClickEnd(){
      },
      dateBack(){
        this.$router.push({
          name: this.$route.params.back,
          params: {
            dateSel: 1
          }
        });

      },
      centerClick(){
        this.$emit('rightClick');
      },
      rightClick(){
        this.$emit('rightClick');
      },
    },
    mounted(){
      this.min = currentYear + '-' + currentMonth + '-' + currentDate;
      this.max = currentYear + 1 + '-' + currentMonth + '-' + currentDate;  //一年

      if (this.$route.params.ruzhu == 2) {
        var day = parseInt(this.$store.state.hotel.ruzhuDay) + 1;
        var month = this.$store.state.hotel.ruzhuMonth;
        var year = this.$store.state.hotel.ruzhuYear;

        if (day < 10) {
          day = '0' + day;
        }

        this.min = year + '-' + month + '-' + day;
      }


      var minYear = parseInt(this.min.substring(0, 4));
      var minMonth = parseInt(this.min.substring(5, 7));
      var minDay = parseInt(this.min.substring(8, 10));
      var maxYear = parseInt(this.max.substring(0, 4));
      var maxMonth = parseInt(this.max.substring(5, 7));
      var maxDay = parseInt(this.max.substring(8, 10));
      var yearLength = maxYear - minYear + 1;


      var years = [];

      for (var n = 0; n < yearLength; n++) {
        var yearJson = {
          dateYear: [
            {
              year: minYear + n,
              month: '01',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
            },
            {
              year: minYear + n,
              month: '02',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'},]
            },
            {
              year: minYear + n,
              month: '03',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
            },
            {
              year: minYear + n,
              month: '04',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
            },
            {
              year: minYear + n,
              month: '05',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
            },
            {
              year: minYear + n,
              month: '06',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
            },
            {
              year: minYear + n,
              month: '07',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
            },
            {
              year: minYear + n,
              month: '08',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
            },
            {
              year: minYear + n,
              month: '09',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
            },
            {
              year: minYear + n,
              month: '10',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
            },
            {
              year: minYear + n,
              month: '11',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
            },
            {
              year: minYear + n,
              month: '12',
              days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
            }
          ],
          year: minYear + n
        };
        years.push(yearJson);
      }

      var json29 = {day: '29'};
      for (var i = 0; i < years.length; i++) {
        var year = years[i].year;
        if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0)) {
          years[i].dateYear[1].days.push(json29);
        } else {
        }
      }

      var json0 = {day: '', kong: true};
      for (var i = 0; i < years.length; i++) {
        for (var j = 0; j < years[i].dateYear.length; j++) {
          var time = years[i].dateYear[j].year + '-' + years[i].dateYear[j].month + '-' + years[i].dateYear[j].days[0].day;
          var week = new Date(time).getDay();
          for (var k = 0; k < week; k++) {
            years[i].dateYear[j].days.unshift(json0);
          }

        }
      }

      if (yearLength == 1) {
        var jj = years[0].dateYear.slice(minMonth - 1, maxMonth);

        years[0].dateYear = jj;


      } else if (yearLength > 1) {
        years[0].dateYear.splice(0, minMonth - 1);
        years[yearLength - 1].dateYear.splice(maxMonth);
      }


      if (yearLength == 1) {
        maxMonth = maxMonth - minMonth + 1
      }


      var minMonthLength = years[0].dateYear[0].days.length;
      var minDayKong = 0;

      for (var i = 0; i < minMonthLength; i++) {
        if (years[0].dateYear[0].days[i].kong == true) {
          minDayKong++;
        }
      }
      var minDayCut = minDayKong + minDay;
      for (var i = 0; i < minDayCut - 1; i++) {
        years[0].dateYear[0].days[i].no = true;
      }


      var maxMonthLength = years[yearLength - 1].dateYear[maxMonth - 1].days.length;

      var maxDayKong = 0;

      for (var i = 0; i < maxMonthLength; i++) {
        if (years[yearLength - 1].dateYear[maxMonth - 1].days[i].kong == true) {
          maxDayKong++;
        }
      }
      var maxDayCut = maxDayKong + maxDay;
      for (var i = maxMonthLength - 1; i > maxDayCut - 1; i--) {
        years[yearLength - 1].dateYear[maxMonth - 1].days[i].no = true;
      }

      if (this.$route.params.ruzhu == 2 && parseInt(currentMonth) == parseInt(minMonth) || this.$route.params.ruzhu == 1) {
        this.jintian = currentDate;
        var currentMonthTime = currentYear + '/' + currentMonth + '/' + '01';
        currentMinWeek = new Date(currentMonthTime).getDay();
        years[0].dateYear[0].days[parseInt(currentDate) + currentMinWeek - 1].day = '今天';
      }

      this.years = years;
    },
    computed: {
      ruzhuTime(){
        return this.$store.state.hotel.ruzhuTime
      },
      ruzhuYear(){
        return this.$store.state.hotel.ruzhuYear
      },
      ruzhuMonth(){
        return this.$store.state.hotel.ruzhuMonth
      },
      ruzhuDay(){
        return this.$store.state.hotel.ruzhuDay
      },
      lidianTime(){
        return this.$store.state.hotel.lidianTime
      },
      lidianYear(){
        return this.$store.state.hotel.lidianYear
      },
      lidianMonth(){
        return this.$store.state.hotel.lidianMonth
      },
      lidianDay(){
        return this.$store.state.hotel.lidianDay
      },
      zhuTian(){
        return this.$store.state.hotel.zhuTian
      },
      curMonthDays(){
        return this.$store.state.hotel.curMonthDays
      },
      lidianSelected(){
        return this.$store.state.hotel.lidianSelected
      },
      todayWeek(){
        return this.$store.state.hotel.todayWeek
      },
      tomorrowWeek(){
        return this.$store.state.hotel.tomorrowWeek
      },
    },
    components: {headNav,},
    updated(){
      var currentDayDiv = document.querySelectorAll('.day');

      if(this.$route.params.ruzhu == 1){
        currentDayDiv[currentDate - 1 + currentMinWeek].className = 'day dayActive';
      }


      if (this.$route.params.ruzhu == 2 && this.ruzhuMonth == currentMonth) {
        currentDayDiv[currentDate - 1 + currentMinWeek].className = 'day no';
      }

    }
  }

  var years1 = [
    {
      dateYear: [
        {
          year: '2017',
          month: '01',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2017',
          month: '02',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'},]
        },
        {
          year: '2017',
          month: '03',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2017',
          month: '04',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2017',
          month: '05',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2017',
          month: '06',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2017',
          month: '07',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2017',
          month: '08',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2017',
          month: '09',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2017',
          month: '10',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2017',
          month: '11',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2017',
          month: '12',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        }
      ],
      year: 2017
    },
    {
      dateYear: [
        {
          year: '2018',
          month: '01',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2018',
          month: '02',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'},]
        },
        {
          year: '2018',
          month: '03',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2018',
          month: '04',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2018',
          month: '05',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2018',
          month: '06',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2018',
          month: '07',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2018',
          month: '08',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2018',
          month: '09',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2018',
          month: '10',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        },
        {
          year: '2018',
          month: '11',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'},]
        },
        {
          year: '2018',
          month: '12',
          days: [{day: '01'}, {day: '02'}, {day: '03'}, {day: '04'}, {day: '05'}, {day: '06'}, {day: '07'}, {day: '08'}, {day: '09'}, {day: '10'}, {day: '11'}, {day: '12'}, {day: '13'}, {day: '14'}, {day: '15'}, {day: '16'}, {day: '17'}, {day: '18'}, {day: '19'}, {day: '20'}, {day: '21'}, {day: '22'}, {day: '23'}, {day: '24'}, {day: '25'}, {day: '26'}, {day: '27'}, {day: '28'}, {day: '29'}, {day: '30'}, {day: '31'}]
        }
      ],
      year: 2018
    },
  ];


</script>
